/<template>
  <div class="mask" v-show="show">
      <div class="cont">
          <span @click="close">❌</span>
          <slot></slot>
      </div>
  </div>
</template>

<script>
export default {
  props:{
    show:Boolean
  },
  methods:{
    close(){
      this.bus.$emit('closeShow')
    }
  }
}
</script>

<style lang='scss'>
  .mask{
    width: 100%;
    height: 100%;
    position: fixed;
    top: 0;
    left: 0;
    background: rgba(0,0,0,.3);
    .cont{
      width: 80%;
      height: 400px;
      background: #fff;
      position: absolute;
      left: 0;
      right: 0;
      top: 0;
      bottom: 0;
      margin: auto;
    }
  }
</style>